/**
 * 测试用例字段显示配置模型
 *
 * Created by nongzhizhong on 2021/11/15.
 */
const mongoose = require('mongoose');
const schemaDefinition = require('./schema/test-case-field-config');
const schemaInstance = mongoose.Schema(schemaDefinition);
schemaInstance.index({ functionId: 1 });
schemaInstance.set('autoIndex', false);
const modelInstance = mongoose.model('test-case-field-config', schemaInstance);
mongoose.connection.on('open', () => modelInstance.syncIndexes().catch(() => {}));

/**
  * Export model definition object.
  */
module.exports = modelInstance;
